<?php
require('HttpClient.class.php');
$client = new HttpClient('www.jcu.edu.au');
$client->setDebug(true);
if (!$client->get('/archives/undergrad-bulletins/maillist.shtml')) {
    die('An error occurred: '.$client->getError());
}
$client->post('/login.php', array(
    'username' => 'Simon',
    'password' => 'ducks'
));
if (!$client->get('/not-there.php')) {
    die('An error occurred: '.$client->getError());
}
$pageContents = $client->getContent();
?>
